Optimal. Leaf size=45 \[ \frac {(A+B) \tanh ^{-1}(\sin (c+d x))}{2 a d}-\frac {A-B}{2 d (a \sin (c+d x)+a)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2836, 77, 206} \[ \frac {(A+B) \tanh ^{-1}(\sin (c+d x))}{2 a d}-\frac {A-B}{2 d (a \sin (c+d x)+a)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rule 206
Rule 2836
Rubi steps
\begin {align*} \int \frac {\sec (c+d x) (A+B \sin (c+d x))}{a+a \sin (c+d x)} \, dx &=\frac {a \operatorname {Subst}\left (\int \frac {A+\frac {B x}{a}}{(a-x) (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a \operatorname {Subst}\left (\int \left (\frac {A-B}{2 a (a+x)^2}+\frac {A+B}{2 a \left (a^2-x^2\right )}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac {A-B}{2 d (a+a \sin (c+d x))}+\frac {(A+B) \operatorname {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,a \sin (c+d x)\right )}{2 d}\\ &=\frac {(A+B) \tanh ^{-1}(\sin (c+d x))}{2 a d}-\frac {A-B}{2 d (a+a \sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 44, normalized size = 0.98 \[ \frac {(A+B) (\sin (c+d x)+1) \tanh ^{-1}(\sin (c+d x))-A+B}{2 a d (\sin (c+d x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.67, size = 73, normalized size = 1.62 \[ \frac {{\left ({\left (A + B\right )} \sin \left (d x + c\right ) + A + B\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left ({\left (A + B\right )} \sin \left (d x + c\right ) + A + B\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, A + 2 \, B}{4 \, {\left (a d \sin \left (d x + c\right ) + a d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 79, normalized size = 1.76 \[ \frac {\frac {{\left (A + B\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a} - \frac {{\left (A + B\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a} - \frac {A \sin \left (d x + c\right ) + B \sin \left (d x + c\right ) + 3 \, A - B}{a {\left (\sin \left (d x + c\right ) + 1\right )}}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.46, size = 112, normalized size = 2.49 \[ -\frac {\ln \left (\sin \left (d x +c \right )-1\right ) A}{4 a d}-\frac {\ln \left (\sin \left (d x +c \right )-1\right ) B}{4 a d}-\frac {A}{2 a d \left (1+\sin \left (d x +c \right )\right )}+\frac {B}{2 a d \left (1+\sin \left (d x +c \right )\right )}+\frac {\ln \left (1+\sin \left (d x +c \right )\right ) B}{4 d a}+\frac {\ln \left (1+\sin \left (d x +c \right )\right ) A}{4 d a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 58, normalized size = 1.29 \[ \frac {\frac {{\left (A + B\right )} \log \left (\sin \left (d x + c\right ) + 1\right )}{a} - \frac {{\left (A + B\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{a} - \frac {2 \, {\left (A - B\right )}}{a \sin \left (d x + c\right ) + a}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.10, size = 43, normalized size = 0.96 \[ \frac {\mathrm {atanh}\left (\sin \left (c+d\,x\right )\right )\,\left (A+B\right )}{2\,a\,d}-\frac {\frac {A}{2}-\frac {B}{2}}{d\,\left (a+a\,\sin \left (c+d\,x\right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {A \sec {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx + \int \frac {B \sin {\left (c + d x \right )} \sec {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________